/******************************************************************************
 *                       B O M B E R M A N  2 0 1 2
 * 
 * File Name: BombCountdown.java
 * 
 * COP 4331 Summer 2012 Project
 * 
 * Authors: Trevor Mancuso, Chris Chiarella, Zach Hoyler, Daniel Martin
 * 
 * 
 * Description: This class is a timer for bombs and explosions.
 * 
 ******************************************************************************/
package bomberman;

import java.util.TimerTask;

public class BombCountdown extends TimerTask{
    
    Bomb bomb;
    Explosion explosion;
        //bomb constructor
        BombCountdown(Bomb bomb)
        {
            this.bomb = bomb;
        }
        //explosion constructor
        BombCountdown(Explosion explosion)
        {
            this.explosion = explosion;
        }
        
        public void run(){
            if(bomb != null) bomb.countDown();  
            if(explosion != null) explosion.countDown();
        }
    
}
